<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "set_user_up".
 *
 * @property int $id
 * @property float $vip1
 * @property float $vip2
 * @property int $vip1_1
 * @property int $vip1_n_1
 * @property int $vip1_n_2
 * @property int $vip2_1
 * @property int $vip2_n_1
 * @property int $vip2_n_2
 * @property int $vip2_2
 * @property int $vip2_n
 * @property int $repeat_1
 * @property int $repeat_2
 * @property float $v1 感恩1
 * @property float $v2 感恩2
 * @property float $profit 分红
 * @property float $score 消费积分
 * @property float $s1 一星
 * @property float $s2
 * @property float $s3
 * @property float|null $s4
 * @property float|null $s5
 * @property float|null $s6
 * @property int $up_1
 * @property int $up_2
 * @property int $up_3
 * @property int $up_4
 * @property int $up_5
 * @property int $up_6
 */
class SetUserUp extends \yii\db\ActiveRecord
{
    use SetUserUpCommon;

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'set_user_up';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['vip1', 'vip2', 'v1', 'v2', 'v3', 'v4', 'v5', 'v6', 'profit', 'score', 's1', 's2', 's3', 's4', 's5', 's6'], 'number'],
            [['vip1_1', 'vip1_n_1', 'vip1_n_2', 'vip2_1', 'vip2_n_1', 'vip2_n_2', 'vip2_2', 'vip2_n', 'repeat_1', 'repeat_2'], 'integer'],
            [['s2', 's3'], 'required'],

            [['up_1', 'up_2', 'up_3', 'up_4', 'up_5', 'up_6'], 'safe'],
            [['repeat_3', 'repeat_4', 'repeat_5', 'repeat_6'], 'safe']
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'vip1' => 'Vip 1',
            'vip2' => 'Vip 2',
            'vip1_1' => 'Vip 1  1',
            'vip1_n_1' => 'Vip 1 N  1',
            'vip1_n_2' => 'Vip 1 N  2',
            'vip2_1' => 'Vip 2  1',
            'vip2_n_1' => 'Vip 2 N  1',
            'vip2_n_2' => 'Vip 2 N  2',
            'vip2_2' => 'Vip 2  2',
            'vip2_n' => 'Vip 2 N',
            'repeat_1' => 'Repeat  1',
            'repeat_2' => 'Repeat  2',
            'v1' => 'V 1',
            'v2' => 'V 2',
            'profit' => 'Profit',
            'score' => 'Score',
            's1' => 'S 1',
            's2' => 'S 2',
            's3' => 'S 3',
            's4' => 'S 4',
            's5' => 'S 5',
            's6' => 'S 6',
        ];
    }
}
